package j2ee.mvc;

/**
 * @author yeyangtao
 * @date 2020/5/20 16:53
 */
public class MvcDemo {
    public static void main(String[] args) {
        StudentModel model = getModelFromDatabase();
        StudentView view = new StudentView();
        StudentController controller = new StudentController(model,view);
        controller.updateView();

        controller.setStudentName("tom");

        controller.updateView();
    }

    private static StudentModel getModelFromDatabase() {
        return new StudentModel(1001,"yyt");
    }


}
